package com.yiduo.outpost.ucenter.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yiduo.outpost.core.log.operation.OperationLog;
import com.yiduo.outpost.core.model.result.Result;
import com.yiduo.outpost.ucenter.service.UserService;
import com.yiduo.outpost.core.model.entity.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author yanwen
 * @create 2023/7/25 14:39
 */
@Slf4j
@RestController
@RequestMapping("users")
@Tag(name = "用户管理",description = "UserController 用户相关的增删改查")
public class UserController {
    @Autowired
    private UserService userService;

    @ApiOperationSupport( author = "yiduo")
    @GetMapping("/list")
    public Result<List<User>> list() {
        return Result.ok(userService.list());
    }

}
